<script setup>
import { reactive } from 'vue'
const form = reactive({
  name: '',
  author:localStorage.getItem('account'),
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})

const onSubmit = () => {
  console.log('submit!')
}
</script>

<template>
  <div class="container">
    <h1 class="title">题目<span>-添加题目</span></h1>

    <el-form :model="form" label-width="auto" style="max-width: 600px">
      <el-form-item label="题目">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item label="作者">
        <el-input v-model="form.author" disabled />
      </el-form-item>
      <el-form-item label="题目类型">
        <el-select v-model="form.region" placeholder="分类">
          <el-option label="语文" value="Chinese" />
          <el-option label="数学" value="Math" />
          <el-option label="英语" value="English" />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">Create</el-button>
        <el-button>Cancel</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>



<style scoped>
.title span {
  font-size: 18px;
  font-weight: 200;
}
</style>
